package com.wust.smartcity.autotask.server.core.api.feign.client;


import com.wust.smartcity.autotask.server.core.api.feign.client.impl.DemoServiceFallbackImpl;
import com.wust.smartcity.common.dto.WebResponseDto;
import com.wust.smartcity.common.entity.demo.Demo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "demo-server",fallback = DemoServiceFallbackImpl.class)
public interface DemoService {
    @RequestMapping(value = "/api/feign/v1/DemoFeignApi/select", method = RequestMethod.POST, consumes = "application/json")
    WebResponseDto select(@RequestHeader(name = "x-ctx", required = true) String ctx, @RequestBody Demo search);

    @RequestMapping(value = "/api/feign/v1/DemoFeignApi/deleteByPrimaryKey", method = RequestMethod.POST, consumes = "application/json")
    WebResponseDto deleteByPrimaryKey(@RequestHeader(name = "x-ctx", required = true) String ctx, @RequestParam Long id);
}
